package com.wuchengdong.web.pojo.dto;

import com.wuchengdong.web.pojo.Appointment;
import com.wuchengdong.web.pojo.Order;
import com.wuchengdong.web.pojo.Payment;
import com.wuchengdong.web.pojo.Review;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * 用户端查询"我的订单"，需要将 预约表 订单表 支付表数据全部取出
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@Accessors(chain = true)
@ToString
public class OrderDTO extends Order {
    public OrderDTO(Order order) {
        super(order.getId(), order.getAppointmentId(), order.getUserId(), order.getTotalPrice(), order.getPaymentStatus(), order.getCreatedAt());
    }
    private Appointment appointment;
    private List<Payment> payments;
    private Review review;
}
